package com.alks.yn_zs.controller;
/**
 * @author MS
 * @since 2025/10/2216:06
 */

import com.alks.entity.data.page.PageParam;
import com.alks.entity.data.page.PageRecord;
import com.alks.entity.data.response.ResponseInfo;
import com.alks.yn_zs.data.dto.FinishStoreDTO;
import com.alks.yn_zs.data.dto.StatsDto;
import com.alks.yn_zs.data.request.StatsRequest;
import com.alks.yn_zs.service.ISoleService;
import com.baomidou.mybatisplus.extension.api.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author MS
 * @since 2025/10/2216:06
 */

@RestController
@RequestMapping("/show/slow")
@Api(value = "生产", tags = "大底看板")
@Slf4j
@RequiredArgsConstructor
public class SoleController {
    @Autowired
    private ISoleService service;

    @PostMapping("/stats")
    @ApiOperation(value = "统计图", tags = "大底看板")
    public ResponseInfo<List<StatsDto>> blankStatsDto(@RequestBody StatsRequest  request) {
        List<StatsDto> dtoList = service.blankState(request);
        return  ResponseInfo.ok(dtoList);
    }

    @PostMapping("/list")
    @ApiOperation(value = "明细", tags = "大底看板")
    public ResponseInfo<PageRecord<FinishStoreDTO>> blankList(@RequestBody PageParam request) {
        PageRecord<FinishStoreDTO> dtoList = service.blankList(request);
        return ResponseInfo.ok(dtoList);
    }
}
